<div style="margin-bottom: 10px;">
            <?php echo $this->form->render(); ?>
</div>
<div id="browsemembers_results" class="browsemembers_results">
<?php $viewer = Engine_Api::_()->user()->getViewer();?>
<ul id="browsemembers_ul">
    <?php foreach( $this->members as $item ): ?>
    <li>
      <?php 
        $user = Engine_Api::_()->getItem('user', $item->user_id);
        if(!is_object($user) && !$user) continue;
      echo $this->htmlLink($user->getHref(), $this->itemPhoto($user, 'thumb.icon')) ?>
      <?php 
      $table = Engine_Api::_()->getDbtable('block', 'user');
      $select = $table->select()
        ->where('user_id = ?', $user->getIdentity())
        ->where('blocked_user_id = ?', $viewer->getIdentity())
        ->limit(1);
      $row = $table->fetchRow($select);
      ?>
      <?php if( $row == NULL ): ?>
        <?php if( $this->viewer()->getIdentity() ): ?>
        <div class='browsemembers_results_links'>
          <?php echo $this->userFriendship($user) ?>
        </div>
      <?php endif; ?>
      <?php endif; ?>

        <div class='browsemembers_results_info'>
          <?php echo $this->htmlLink($user->getHref(), $user->getTitle()) ?>
          <?php echo $user->status; ?>
          <?php if( $user->status != "" ): ?>
            <div>
              <?php echo $this->timestamp($user->status_date) ?>
            </div>
          <?php endif; ?>
        </div>
    </li>
    <?php endforeach; ?>
</ul>
<?php if( $this->users ): ?>
  <div class='browsemembers_viewmore' id="browsemembers_viewmore">
    <?php echo $this->paginationControl($this->members, null, null, array(
      'pageAsQuery' => true,
      'query' => $this->formValues,
      //'params' => $this->formValues,
    )); ?>
  </div>
<?php endif; ?>

<script type="text/javascript">
  page = '<?php echo sprintf('%d', $this->page) ?>';
  totalUsers = '<?php echo sprintf('%d', $this->totalUsers) ?>';
  userCount = '<?php echo sprintf('%d', $this->userCount) ?>';
</script>
</div>
<style>
.browsemembers_results > ul > li
{
  overflow: hidden;
  border-top-width: 1px;
  margin-top: 10px;
  padding-top: 10px;
}
.browsemembers_results > ul > li > a
{
  display: block;
  float: left;
}
html[dir="rtl"] .browsemembers_results > ul > li > a
{
  float: right;
}
.browsemembers_results > ul > li > a > img
{
  border: 1px solid $theme_photo_border_color;
}
.browsemembers_results div.browsemembers_results_info
{
  padding-left: 5px;
  overflow: hidden;
}
html[dir="rtl"] .browsemembers_results div.browsemembers_results_info
{
  padding-left: 0px;
  padding-right: 5px;
}
.browsemembers_results div.browsemembers_results_info > a
{
  font-weight: bold;
}
.browsemembers_results div.browsemembers_results_info > div
{
  font-size: .8em;
  color: $theme_font_color_light;
}
.browsemembers_results div.browsemembers_results_links
{
  float: right;
  overflow: hidden;
  width: 175px;
  text-align: right;
}
html[dir="rtl"] .browsemembers_results div.browsemembers_results_links
{
  float: left;
  text-align: left;
}
.browsemembers_results_links a.buttonlink
{
  font-size: .8em;
  padding-top: 2px;
  padding-bottom: 3px;
}
.browsemembers_results div.browsemembers_viewmore,
.browsemembers_results div.browsemembers_loading
{
  margin-top: 10px;
  border-top-width: 1px;
  padding-top: 10px;
}
</style>